import {HttpClient} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from "rxjs/Observable";

@Injectable()
export class DetailProvider {

    url: string = 'http://localhost:9080/api/GetOrPostDetails';

    constructor(public http: HttpClient) {
    }

    getDetails(): Observable<any> {
        // return this.http.get(this.url);
        return this.http.get(this.url);
    }

    postDetails(): Observable<any> {
        return this.http.post(this.url, {a: 1, b: 2})
    }

}
